﻿
@{
		ViewBag.Title = "Items";
		Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Items</h2>
<hr/>


<div style="margin-bottom: 16px">
		<a href="@Url.Action("Create", "ItemsEF")" class="btn btn-primary"><span class="glyphicon glyphicon-plus">&nbsp;</span>Create New</a>

		<div class="dropdown pull-right">
				<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown" style="margin-right: 10px"><span class="glyphicon glyphicon-floppy-disk">&nbsp;</span>Export&nbsp;&nbsp;<span class="caret"></span></button>
				<ul class="dropdown-menu">
						<li><a href="">Excel (.xls)</a></li>
						<li><a href="">Word (.doc)</a></li>
						<li><a href="">CSV (.csv)</a></li>
				</ul>
				<button class="btn btn-primary pull-right" onclick="javascript: print();"><span class="glyphicon glyphicon-print"></span>&nbsp;Print</button>
		</div>
</div>


@section scripts {
		<script src="~/Scripts/Angular_Controllers/DataverseAngular.js"></script>
}

<div class="panel panel-primary">
		<div class="panel-heading">List of items</div>
		<div class="panel-body">
				<table class="table table-bordered table-hover table-responsive">
						<tr>
								<th>Name</th>
								<th>Unit</th>
								<th>Quantity</th>
						</tr>

						<tr ng-repeat="i in items">
								<td>{{i.Name}}</td>
								<td>{{i.Unit}}</td>
								<td>{{i.Quantity}}</td>
								<td><a href="@Url.Action("Edit", "ItemsEF")/{{i.Item_id}}" class="btn btn-info"><span class="glyphicon glyphicon-edit">&nbsp;</span>Edit</a> |
								<a href="@Url.Action("Details", "ItemsEF")/{{i.Item_id}}" class="btn btn-primary"><span class="glyphicon glyphicon-tags">&nbsp;</span>Details</a> |
								<a href="@Url.Action("Delete", "ItemsEF")/{{i.Item_id}}" class="btn btn-danger"><span class="glyphicon glyphicon-trash">&nbsp;</span>Delete</a></td>
						</tr>
				</table>
		</div>
</div>

